#include <iostream>
#include <vector>

using namespace std;

int jumpFloor(int number) {
	static vector<int> fabs = { 0,1,2 };
	if (number < fabs.size())
		return fabs[number];
	else
	{
		int f = jumpFloor(number - 1) + jumpFloor(number - 2);
		fabs.push_back(f);
		return f;
	}
}


int sum(vector<int> v)
{
	int sum(0);
	for (auto i : v)
		sum += i;
	return sum;
}

int jumpFloorII(int number) {
	static vector<int> fabs = { 0,1,2 };
	if (number < fabs.size())
		return fabs[number];
	else
	{
		int f = sum(fabs) + 1;
		fabs.push_back(f);
		return f;
	}
}